<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件监听</title>
</head>
<body>
    <button>点击我</button>
    <script>
        let num=10
        //获取元素对象
        let btn=document.querySelector('button')
        //事件源，事件类型，做什么
        btn.addEventListener('click', function(){
            // return(
            //     // <div>薪资过完</div>
            // )
            alert("xinziguwoan")
        })

    </script>
</body>
</html>